package com.yilu.driver.mvp.contract;

import com.is.common.base.BaseModel;
import com.is.common.base.BasePresenter;
import com.is.common.base.BaseView;
import com.is.common.retrofitrxcache.RxCacheResult;
import com.yilu.driver.entity.BatchAllResponse;
import com.yilu.driver.entity.StudentApplyResponse;

import org.json.JSONObject;

import rx.Observable;

/**
 * @author Administrator
 * @date 2017/4/17 0017
 */

public interface ApplyExamContract {
    interface Model extends BaseModel {
        //加载报考学员
        Observable<RxCacheResult<StudentApplyResponse>> getApplyStudent(JSONObject json);

        //加载学员报考名单
        Observable<RxCacheResult<StudentApplyResponse>> getExamRoster(JSONObject json);

        //加载筛选条件（科目、批次）
        Observable<RxCacheResult<BatchAllResponse>> getBatchAll(JSONObject json);
    }

    interface View extends BaseView {
        //更新UI
        void returnApplyStudent(StudentApplyResponse studentApplyResponse);

        void returnExamRoster(StudentApplyResponse rosterResponse);

        void returnBatchAll(BatchAllResponse batchAllResponse);

    }

    abstract class Presenter extends BasePresenter<ApplyExamContract.View, ApplyExamContract.Model> {
        //发送获取未报考学员列表请求
        public abstract void getApplyStudent(JSONObject json);

        //发送获取学员报考名单列表请求
        public abstract void getExamRoster(JSONObject json);

        //发送获取筛选条件请求
        public abstract void getBatchAll(JSONObject json);

    }
}
